Skip to content

Windows and tab tear-off, insert space, ink to text, smarter text boxes - #6

Merged
yoztuerk merged 1 commit into
mainfrom
windows-tabs-space-ink-text
Nov 24, 2026
Merged

yoztuerk merged 1 commit into
mainfrom
windows-tabs-space-ink-text

Conversation

@yoztuerk

Copy link
Copy Markdown
Owner

What changed

Single instance and windows

  • Opening a .pdf / .yunote from Explorer (or launching YuNotes again) hands the file to the running YuNotes, which opens it as a tab in the last-used window. A plain second launch opens a new window. Program.cs now supplies Main (DISABLE_XAML_GENERATED_MAIN) and redirects activations with AppInstance.
  • Several windows, each with its own tabs (MainWindow.Tabs). Tabs can be reordered, dragged out into a new window, dropped onto another window's tab strip, or moved from the tab's right-click menu. A note is open in at most one window: opening it again switches to where it already is.
  • Window helpers (Navigate, GoBack, drag region, full screen, pickers, share) now act on the page's own window instead of a single global one.

Insert space

  • With the Page size tool, drag down inside a page to open blank space at that line (the PDF below moves down), drag up to close it. Stored per page (gaps_json, new PageGaps model), undoable, and drawn in pieces on screen, in thumbnails, PNG/PDF export and the zoomed-in hi-res crop. PDF text selection and search are mapped through the gaps.

Widened and spaced pages in saved PDFs

  • Imported pages that were widened or had space inserted are rebuilt at their real size, with the original page drawn as vectors (text stays selectable). Before, widened pages were squeezed into the original page size. The template is drawn on the added strips and space.
  • Saved-page format bumped to vector-2, so existing files re-render every page once on their next save instead of reusing squeezed pages.

Convert handwriting to text

  • New selection-bar button: recognizes the lassoed ink with Windows' handwriting recognizer, lets you correct it, then replaces the ink with a text box (one undo step) or copies the text.

Resizing

  • Text boxes: side handles rewrap at the same font size, corners scale box and font together, the height always fits the text (also after editing), and the resize preview draws the real result instead of a stretched snapshot.
  • Other selections get width-only and height-only handles. Triangles now scale their third corner on resize (it was left in place before).

Glass toolbar

  • The edge band always samples the backdrop. The live canvas capture didn't follow scroll/zoom and showed page that wasn't behind the toolbar; it is removed along with the pause-while-drawing plumbing, which also lowers idle GPU use.

Notes for review

  • Not merged to main on purpose: pushing main triggers the release workflow and auto-updates GitHub installs. Most features here have only been built, not exercised end to end.
  • Single instance with the Store build: file activation was only built against the unpackaged dev build; check Explorer → open file with the packaged/Store build too.
  • Insert space + PDF save: worth opening a saved PDF in another viewer to confirm the rebuilt pages (widened and/or with space) line up with the ink.
  • PDF text runs are still cleared on undo and only come back on reopen (unchanged behaviour).

🤖 Generated with Claude Code

- Single instance: files opened from Explorer (or a second launch) go to
  the running YuNotes and open as a tab in the last-used window; a plain
  launch opens a new window. Program.cs supplies Main for the hand-off.
- Several windows, each with its own tabs. Tabs can be reordered, dragged
  out into a new window, dropped onto another window's tab strip, or moved
  from the tab's right-click menu. A note is open in one window at most.
- Insert space: with the Page size tool, drag down inside a page to open
  blank space at that line (the PDF below moves down), drag up to close it.
  Stored per page (gaps_json), undoable, drawn in pieces on screen and in
  exports; saved PDFs keep the original page as vectors.
- Widened imported pages are saved and exported at their full width
  instead of being squeezed into the original page size, with the template
  on the added strips. Saved-page format bumped so old files re-render once.
- Convert handwriting to text from the lasso selection bar: review the
  recognized text, then replace the ink with a text box or copy it.
- Text boxes: side handles rewrap at the same font size, corners scale box
  and font together, height always fits the text, and the resize preview
  shows the real result. Other selections get width-only and height-only
  handles; triangles now scale their third corner.
- Glass toolbar: the edge band always samples the backdrop. The live
  canvas capture didn't follow scroll/zoom (showed page that wasn't behind
  the toolbar), so it and the pause-while-drawing plumbing are removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@yoztuerk
yoztuerk merged commit 982068e into main Nov 24, 2026
1 check passed
@yoztuerk
yoztuerk deleted the windows-tabs-space-ink-text branch November 24, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant